<?php
/**
 * Created by JetBrains PhpStorm.
 * User: CAIXUDONG
 * Date: 11-6-15
 * Time: 下午4:04
 */
 
Class Template{
    static public function show($view = '',$data = array()){
        global $_input,$_session;
        if($view == ''){
            $view = basename($_SERVER['SCRIPT_NAME']);
        }

        if (file_exists(VIEW_PATH . $view)){
            if($data){
                extract($data);
            }
            include VIEW_PATH . $view;
        }else{
            die('模板：'.VIEW_PATH.$view.'没有找到！');
        }
    }
}